package com.ns.scs.stat.entry;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ns.core.entry.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 统计面板数据记录表
 *
 * @author lw
 * @version 1.0.0
 * @since 2024-11-08
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@Accessors(chain = true)
@TableName(value = "SCSS_VIEW_STATISTICS")
public class StatEntry extends BaseModel {
    /**
     * 此模块对应的表名
     */
    public static final String TABLE_NAME = "SCSS_VIEW_STATISTICS";

    /**
     * 唯一标识
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 编码
     */
    private String code;

    /**
     * 统计SQL
     */
    private String sqlExp;

    /**
     * 最新结果
     */
    private Long count;


    /**
     * 上次结果
     */
    private Long variable;
}
